import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { processFormType, queryProcessType,ProcessVO } from './types';

/** 新增工序 */
export const addProcessApi = (data:processFormType ) => {
    return request({
        url: '/system/workingProcedureInfo',
        method: 'post',
        data: data
    })
};

/** 查询工序列表 */
export const queryProcessListApi = (data: queryProcessType):AxiosPromise<ProcessVO[]> => {
    return request({
        url: '/system/workingProcedureInfo/list',
        method: 'post',
        data: data
    });
};

/** 获取工序信息详细信息 */
export const getProcessDetailApi = (id: string | number) => {
    return request({
        url: '/system/workingProcedureInfo/${id}',
        method: 'get',
    });
};

/** 修改工序信息 */
export const updateProcessApi = (data: processFormType) => {
    return request({
        url: '/system/workingProcedureInfo',
        method: 'put',
        data: data
    });
};